package it.blueocean.acanto.web.platform.components.feedback;

import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;

public class SelectModalWindow extends ModalWindow
{
	private static final long serialVersionUID = 7307585063036763634L;

	/**
	 * Create a new instance of ModalWindow.
	 * 
	 * @param id
	 * @param windowTitle
	 * @param initialWidth
	 * @param initialHeight
	 */
	public SelectModalWindow(String id, String windowTitle, int initialWidth, int initialHeight)
	{
		super(id);

		setInitialWidth(initialWidth);
		setInitialHeight(initialHeight);

		setTitle(windowTitle);

		setContent(new SelectContentPanel(this.getContentId())
		{
			private static final long serialVersionUID = -3755322284098658117L;

			public void onCancel(AjaxRequestTarget target)
			{
				SelectModalWindow.this.onCancel(target);
			}
		});
	}

	public void onCancel(AjaxRequestTarget target)
	{
		close(target);
	}
}
